package com.hguo.ribbon.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author leizi
 * @create 2023-04-15 21:34
 */
@Configuration
public class RestTemplateConfig {

    @Bean
    @LoadBalanced //ribbon 的负载均衡注解
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
